﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VonaJobs.DAL.DAO;
using VonaJobs.DAL.Gatway;

namespace VonaJobs.BLL
{
    public class LocationManager
    {
        LocationGateway locationGateway=new LocationGateway();
        public string CreateNewLocation(Location location)
        {
            try
            {
                if (!HasThisjobLocationExist(location))
                {
                    
                }
                return locationGateway.SaveNewLocation(location);
            }
            catch (Exception)
            {
                
                throw;
            }
        }

        private bool HasThisjobLocationExist(Location location)
        {
            try
            {
                return locationGateway.HasThisjobLocationExist(location);
            }
            catch (Exception)
            {
                
                throw;
            }
        }

        public string UpdateJobLocation(Location location)
        {
            try
            {
                return locationGateway.UpdateJobLocation(location);
            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}